package day07.ZiXi;

import java.time.LocalDateTime;

public class LocalDateTime04 {
    public static void main(String[] args) {
        //public LocalDateTime plusYears (long years)添加或者减去年
        LocalDateTime localDateTime = LocalDateTime.of(2015,11,11,11,11,11);

        LocalDateTime newLocalDateTime = localDateTime.plusYears(+1);
        System.out.println(newLocalDateTime);
        //public LocalDateTime plusMonths(long months)添加或者减去月
        LocalDateTime zxc = localDateTime.plusMinutes(-1);
        System.out.println(zxc);


        //public LocalDateTime  minusYears (long years)减去或者添加年
        LocalDateTime asd = localDateTime.minusYears(-4);
        System.out.println(asd);

        //public LocalDateTime withYear(int year)直接修改年
        LocalDateTime qwe = localDateTime.withYear(2078);
        System.out.println(qwe);
    }
}
